const mongoose = require('mongoose')

const Schema = mongoose.Schema

mongoose.connect("mongodb://localhost/graproject", { useNewUrlParser: true })

var typeSchema = new Schema({
    wTypeId:{//博主的id  根据此 id获取分类
        type: Object,
        required: true
    },

    wTypeData:{
        type: Array,
        required: true
    }
    //包含一下数据 对象
    // typeId:{//分类的id
    //     type: String,
    //     required: true
    // },
    // type:{//分类
    //     type: String,
    //     required: true
    // },
    // typeDesc:{//分类描述
    //     type: String,
    //     required: true
    // }
})

module.exports = mongoose.model('writingType', typeSchema)